import Login from '@/components/login/Login.vue'
import HelloWorld from "@/components/HelloWorld";
import Register from "@/components/login/Register";
import RetrievePassword from "@/components/login/RetrievePassword";
import home from "@/components/home/layout/Home";
import MenuList from "@/components/home/pms/menu/MenuList";
import UserList from "@/components/home/pms/user/UserList";
import RoleList from "@/components/home/pms/role/RoleList";
import LowCodeRouter from "@/components/home/lowCode/LowCodeRouter";
import AppInfo from "@/components/home/lowCode/appDef/AppInfo";
import FormDefine from "@/components/home/lowCode/appDef/form/FormDefine";
import FormManager from "@/components/home/lowCode/appDef/form/FormManager";
import AppMenu from "@/components/home/lowCode/appDef/menu/AppMenu";
import AppFormNew from "@/components/home/lowCode/formRun/AppFormNew";
import DefForm from "@/components/home/lowCode/appDef/form/DefForm";

const routers = [
    {
        path: '/toLogin',
        name: 'login',
        component: Login
    }, {
        path: '/register',
        component: Register
    },
    {
        path: '/retrievePassword',
        component: RetrievePassword
    },
    {
        path: '/',
        redirect: "/home",
    },
    {
        path: '/home',
        component: home,
        children: [
            {
                path: '/pms/menu',
                component: MenuList,
            },
            {
                path: '/pms/user',
                component: UserList,
            },
            {
                path: '/pms/role',
                component: RoleList,
            },
            ...LowCodeRouter
        ]
    },
    {
        path: '/app_def/info',
        name: 'appInfo',
        component: AppInfo,
        children: [
            {
                path: '/form/manager',
                component: FormManager
            },
            {
                path: '/menu/manager',
                component: AppMenu
            }
        ]
    },
    {
        path: '/app_def/form_def',
        name: 'FormDefine',
        component: FormDefine,
        children: [
            {
                path: '/app_def/defForm',
                component: DefForm
            },
            {
                path: '/defBind',
                component: FormDefine
            }
        ],
    },
    {
        path: '/low_code/form_new',
        name: 'formNew',
        component: AppFormNew
    },
    {
        path: '/helloWorld',
        component: HelloWorld
    },
]
export default routers
